package com.example.zhenyi;

import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import javafx.stage.WindowEvent;

import java.io.IOException;

public class ExportMain {

    public void mainApp() throws IOException {
        Stage stage = new Stage();
        stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
            @Override
            public void handle(WindowEvent windowEvent) {
                System.exit(0);
            }
        });
        stage.setResizable(false);
        FXMLLoader fxmlLoader = new FXMLLoader(ExportMain.class.getResource("zhenyi-view.fxml"));
        Scene scene = new Scene(fxmlLoader.load(), 700, 386);
        stage.setScene(scene);
        stage.setTitle("安庆爱康健康体检中心-导出振宜体检数据V2.2.1");
        //stage.initStyle(StageStyle.UNIFIED);
        Image icon = new Image(getClass().getResourceAsStream("/爱康.jpg" ));
        stage.getIcons().add(icon);
        stage.show();
    }

}
